# 选择运行时基础镜像
FROM nginx:latest

#删除目录下的default.conf文件
RUN rm /etc/nginx/conf.d/default.conf

# 设置时区
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

# 将本地nginx.conf配置覆盖到nginx配置
COPY nginx.conf /etc/nginx/nginx.conf
# 将dist文件中的内容复制到/usr/share/nginx/html/
COPY dist/ /usr/share/nginx/html/
 
#声明端口
EXPOSE 81

RUN echo 'web project build success!'